//
//  ContributionScoreObj.h
//  CareRingApp
//
//  Created by Linktop on 2022/8/3.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>



@class  StagingDataV2;

// 睡眠期间的贡献类型
typedef NS_ENUM(NSUInteger, CONTRIBUTION_TYPE_IN_SLEEP) {
    CONTRIBUTION_TYPE_heart_rate_immersion = 1, // 心率沉浸
    CONTRIBUTION_TYPE_hrv,              // hrv
    CONTRIBUTION_TYPE_sleep_duration,   // 睡眠时长
    CONTRIBUTION_TYPE_thermemoter,      // 体表温
    
    CONTRIBUTION_TYPE_quality_sleep,    // 优质睡眠
    CONTRIBUTION_TYPE_deep_sleep,       // 深度睡眠
};

NS_ASSUME_NONNULL_BEGIN

@interface ContributionScoreObj : NSObject

@property(assign, nonatomic) CONTRIBUTION_TYPE_IN_SLEEP type ;
//@property(assign, nonatomic) CONTRIBUTE_LEVEL level;
@property(strong, nonatomic) NSNumber *score;




//+(UIColor *)levelColor:(CONTRIBUTE_LEVEL)level;


/// 计算睡眠效率
/// - Parameter sleepData:
+(NSNumber *)calcSleepEffecy:(StagingDataV2 *)sleepData;
/// 计算优质睡眠时间
/// - Parameter sleepObj: 睡眠
+(NSNumber *)calcQualitySleepDuration:(StagingDataV2 *)sleepObj;
+(NSNumber *)calcSleepDuration:(StagingDataV2 *)sleepObj;
+(NSNumber *)calcDeepSleepDuration:(StagingDataV2 *)sleepObj;



@end

NS_ASSUME_NONNULL_END
